﻿namespace TriangleGames.TrainResEditor
{
    using System;
    using UnityEditor;
    using UnityEngine;

    public class AboutTrainRes : EditorWindow
    {
        private void OnEnable()
        {
            base.title = "关于";
            base.minSize = new Vector2(264f, 295f);
            base.maxSize = new Vector2(264f, 296f);
        }

        private void OnGUI()
        {
            if (!FsmEditorStyles.IsInitialized())
            {
                FsmEditorStyles.Init();
            }
            GUILayout.BeginVertical(new GUILayoutOption[0]);
            FsmEditorGUILayout.TrainResHeader(this);
            GUILayout.Label("\x00a9 版权所有.", EditorStyles.miniLabel, new GUILayoutOption[0]);
            GUILayout.Label("版本 " + FsmEditorUtility.TrainResVersionString(), new GUILayoutOption[0]);
            GUI.enabled = false;
            GUILayout.Box("开发人员：Alfred", FsmEditorStyles.InfoBox, new GUILayoutOption[] { GUILayout.MinHeight(145f) });
            GUI.enabled = true;
            GUILayout.FlexibleSpace();
            if (GUILayout.Button("发布公告", new GUILayoutOption[0]))
            {
                EditorCommands.OpenWikiPage(WikiPages.ReleaseNotes);
            }
            if (GUILayout.Button("Triangle-Games", new GUILayoutOption[0]))
            {
                Application.OpenURL("http://www.triangle-games.com/");
            }
            GUILayout.Space(5f);
            GUILayout.EndVertical();
        }
    }
}

